/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author SERGIO MOLINA
 */
public class Tag<E> implements Comparable<Tag<E>> {
	
	private E origen;
	private E dest;
	private int total;

	public Tag(E origen, E dest, int total){
		this.dest=dest;
		this.origen=origen;
		this.total=total;
	}
	
	public void setOrigen(E origen){
		this.origen=origen;
	}
	
	public void setTotal(int total){
		this.total=total;
	}
	
	public E getOrigen(){
		return this.origen;
	}
	
	public E getDest(){
		return this.dest;
	}
	
	public int getTotal(){
		return this.total;
	}

	@Override
	public int compareTo(Tag<E> arg0) {

		if(this.total<arg0.total)
			return -1;
		else if(this.total>arg0.total)
			return 1;
		else
			return 0;
        }
}
